//
//  SheetTabViewCell.m
//  优学荟管理系统
//
//  Created by edz on 2018/3/2.
//  Copyright © 2018年 星道三好. All rights reserved.
//

#import "SheetTabViewCell.h"

@implementation SheetTabViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.contentView.backgroundColor = [UIColor whiteColor];
        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
        [self setUI];
        
    }
    return self;
}
-(void)setUI
{
    UIImageView *img = [[UIImageView alloc]init];
    img.image=[UIImage imageNamed:@"list_icon_news_default"];
    [self.contentView addSubview:img];
    
    [img mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(15);
        make.top.offset(30);
        make.width.height.offset(20);
    }];
    
    _titleLab = [[UILabel alloc]init];
    [self.contentView addSubview:_titleLab];
    [_titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(img.mas_right).offset(15);
        make.top.offset(15);
    }];
    _titleLab.textColor = RGBColor(102, 102, 102);
    
    _dateLab = [[UILabel alloc]init];
    [self.contentView addSubview:_dateLab];
    [_dateLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(img.mas_right).offset(15);
        make.top.equalTo(_titleLab.mas_bottom).offset(5);
    }];
     _dateLab.textColor = RGBColor(150, 149, 149);
    
    UIView *view = [[UIView alloc]init];
    [self.contentView addSubview:view];
    view.backgroundColor = RGBColor(245, 245, 245);
    [view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(15);
        make.right.offset(-15);
        make.height.offset(1);
        make.bottom.offset(0);
    }];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
